# #!/bin/bash
# # 1.  配置YUM
# # 2. 安装服务
# # 3. 启动服务
# # 4. 配置web页面
# # 5. 修改配置

# #创建一个hello函数
# hello(){
#     echo  "hello"
# }

# conf_yum(){
#      #1.查看系统类型
#      #2.指定源的类型
# }

# install_service(){
#     #1.查看系统类型
#     #2.服务的菜单
#        #1.yum
#        #2.源码
# }

# conf_file(){
#     echo  "modify conf file"
# }

# manager_service(){
#     #1. 服务管理菜单 
#     #重启/启动/重新加载/停止
# }

# meun(){
# echo "======================"
# echo "1. 配置yum"
# echo "2. 安装服务"
# echo "3. 配置服务"
# echo "4. 管理服务"
# echo "5. 退出"
# echo "======================"
# }


# while true
# do
#     meun
#     read  -p  "请输入数字:" num
#     case  $num in
#         1)
#         conf_yum
#         continue
#         ;;
#         2)
#         install_service
#         continue
#         ;;
#         3)
#         conf_file
#         continue
#         ;;
#         4)
#         manager_service
#         continue
#         ;;
#         5)
#         echo "退出"
#         break
#         ;;
#         *)
#         echo  "请重新输入"
#         continue
#         ;;
#     esac
# done













# #!/bin/bash
# # 1.  配置YUM
# # 2. 安装服务
# # 3. 启动服务
# # 4. 配置web页面
# # 5. 修改配置

# #创建一个hello函数
# hello(){
#     echo  "hello"
# }

conf_yum(){
    #本地YUM
    1.检查本地是否镜像挂载
    if [ -s / ];then
        mount 
        if [ $? -eq 0 ];then
        exit
        fi
    fi
    2.配置本地源的配置文件
    cat  >  local <<EOF
    kjkljkljkljkl
    EOF
}

install_service(){
    #1.查看系统类型
    #2.服务的菜单
       #1.yum
       #2.源码
}

conf_file(){
    echo  "modify conf file"
}

manager_service(){
    #1. 服务管理菜单 
    #重启/启动/重新加载/停止
}

meun(){
echo "======================"
echo "1. 配置yum"
echo "2. 安装服务"
echo "3. 配置服务"
echo "4. 管理服务"
echo "5. 退出"
echo "======================"
}


while true
do
    meun
    read  -p  "请输入数字:" num
    case  $num in
        1)
        conf_yum
        continue
        ;;
        2)
        install_service
        continue
        ;;
        3)
        conf_file
        continue
        ;;
        4)
        manager_service
        continue
        ;;
        5)
        echo "退出"
        break
        ;;
        *)
        echo  "请重新输入"
        continue
        ;;
    esac
done

